package reflect;

import reflect.annotations.AutoRunMethod;

import java.lang.reflect.Method;

public class ReflectDemo10 {
    public static void main(String[] args) throws Exception {
        Class cls=Class.forName("reflect.Person");
        Method method1=cls.getMethod("doSome");
        boolean mark1=method1.isAnnotationPresent(AutoRunMethod.class);
        System.out.println("doSome方法上是否有@AutoRunClass："+mark1);

        Method method2=cls.getMethod("sayHello");
        boolean mark2=method2.isAnnotationPresent(AutoRunMethod.class);
        System.out.println("sayHello方法上是否有@AutoRunClass："+mark2);

    }
}
